/*
 * EntrySet.java
 *
 * Created on 2007年8月5日, 下午10:16
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package com.afaker.rss.feed;

import java.util.ArrayList;

/**
 *
 * @author bruce
 */
public class EntrySet extends ArrayList{
    /** Creates a new instance of EntrySet */
    public EntrySet() {
    }
    public void addEntry(FeedEntry entry){
        super.add(entry);
    }
    public FeedEntry getEntry(int index)
    {
       return  (FeedEntry) super.get(index);
    }

    public void removeEntry(int index)
    {
        super.remove(index);
    }
    public void removeEntry(FeedEntry entry)
    {
        super.remove(entry);
    }
    public void removeEntry(String uri)
    {
        FeedEntry entry;
        for (int i = 0; i < size(); i++) {
            entry = (FeedEntry) getEntry(i);
            if(entry.getURI().equals(uri))
            {
                removeEntry(entry);
                return ;
            }
        }
    }
    public int size()
    {
        return super.size();
    }
    
}
